<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<html>
<head>
<base href="<%=basePath%>" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>【Example Jsp】</title>
<link rel="StyleSheet" href="common/dtree/dtree.css" type="text/css" />
<script type="text/javascript" src="common/jquery/jquery-1.5.1.js"></script>
<script type="text/javascript" src="common/dtree/dtree.js"></script>
<script type="text/javascript">
	//$.ajaxSetup({async: false});
	$(document).ready(function() {
		jQuery.getJSON("SYS/authsAction.action", function Callback(data) {
			createTree(data);
		}, "json");
	});
	d = new dTree('d');
	function createTree(data) {
		data = eval(data);
		$.each(data, function(i, info) {
			if (i == 0) {
				d.add(0, -1, info.varname);
			} else {
				d.add(info.varcode, info.parentCode, info.varname, info.varurl, info.varname, "t4");
			}
		});
		$("#treeinfo").append(d.toString());
	}
</script>
</head>
<body>
<s:hidden id="userID" name="userID" value="ds" />
<s:hidden id="userName" name="userName" />
<s:hidden id="deptID" name="deptID" />
<s:hidden id="deptName" name="deptName" />
<s:hidden id="unitID" name="unitID" />
<s:hidden id="unitName" name="unitName" />
<div id="treeinfo" class="dtree">
<p><a href="javascript: d.openAll();">open all</a> | <a
	href="javascript: d.closeAll();">close all</a></p>
</div>
</body>
</html>